<template>
    <a-dropdown trigger="click">
        <a class="ant-dropdown-link" @click.prevent style="display: inline-block; height: 100%; vertical-align: initial;">
            <InfoCircleOutlined/>
        </a>
        <template #overlay>
            <a-menu>
                <a-menu-item @click="showAbout" key="2">关于</a-menu-item>
            </a-menu>
        </template>
    </a-dropdown>
    <about-dialog ref="aboutDialog"></about-dialog>
</template>

<script>
    import aboutDialog from '../../views/common/AboutDialog.vue'
    import {DownOutlined, InfoCircleOutlined} from '@ant-design/icons-vue';

    export default {
        name: 'HeaderAvatar',
        data() {
            return {};
        },
        components: {DownOutlined, InfoCircleOutlined, aboutDialog},
        mounted() {
        },
        methods: {
            showAbout() {
                this.$refs.aboutDialog.show();
            },
        },
    }
</script>

<style scoped>
    .avatar {
        margin: 20px 4px 20px 0;
        color: #1890ff;
        background: hsla(0, 0%, 100%, .85);
        vertical-align: middle;
    }
</style>
